package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName(value = "t_goods_product", autoResultMap = true)
public class GoodsProduct extends BaseModel{

    @TableField("goods_id")
    private Long goodsId;

    @TableField(value = "specifications", typeHandler = JacksonTypeHandler.class)
    private String[] specifications;

    @TableField("price")
    private BigDecimal price;

    @TableField("number")
    private Integer number;

    @TableField("url")
    private String url;

    @Version
    private Integer version;

}